package org.budo.sharding.hint.annotation;

import java.lang.annotation.ElementType;
import java.lang.annotation.Inherited;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;

/**
 * 注解在一个方法上，指定这个方法的数据库查询走主库
 * 
 * @author limingwei
 * 
 * @see org.budo.sharding.hint.aop.AnnotationMasterOnlyAopInterceptor
 * @see org.budo.sharding.datasource.MasterSlaveDataSourceFactoryBean
 * @see io.shardingsphere.core.api.algorithm.masterslave.MasterSlaveLoadBalanceAlgorithm
 */
@Retention(RetentionPolicy.RUNTIME)
@Target(ElementType.METHOD)
@Inherited
public @interface MasterOnly {
    boolean value() default true;
}
